
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <title>throwException · React源码解析</title>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.0">
        
        
        
    
    <link rel="stylesheet" href="../../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-theme-api/theme-api.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="../../../styles/website.css">
        
    
        
    
        
    
        
    
        
    
        
    

         
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="../begin-work.html" />
    
    
    <link rel="prev" href="../render-root.html" />
    

<script
  async
  src="https://www.googletagmanager.com/gtag/js?id=UA-49483742-5"
></script>
<script>
  window.dataLayer = window.dataLayer || []
  function gtag() {
    dataLayer.push(arguments)
  }
  gtag('js', new Date())

  gtag('config', 'UA-49483742-5')
</script>

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../../">
            
                <a href="../../../">
            
                    
                    首页
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" >
            
                <span>
            
                    
                    基础
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../../api/react.html">
            
                <a href="../../api/react.html">
            
                    
                    React API
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../../api/react-element.html">
            
                <a href="../../api/react-element.html">
            
                    
                    ReactElement
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../../api/react-children.html">
            
                <a href="../../api/react-children.html">
            
                    
                    React Children
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="../../api/react-structure.html">
            
                <a href="../../api/react-structure.html">
            
                    
                    React 中的数据结构
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" >
            
                <span>
            
                    
                    创建更新
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../../update/react-dom-render.html">
            
                <a href="../../update/react-dom-render.html">
            
                    
                    ReactDOM.render
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../../update/set-state.html">
            
                <a href="../../update/set-state.html">
            
                    
                    setState & forceUpdate
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../../update/expiration-time.html">
            
                <a href="../../update/expiration-time.html">
            
                    
                    expirationTime 计算
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" >
            
                <span>
            
                    
                    任务调度
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../scheduler-global.html">
            
                <a href="../scheduler-global.html">
            
                    
                    全局变量
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../schedule-work.html">
            
                <a href="../schedule-work.html">
            
                    
                    scheduleWork
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../scheduler-pkg.html">
            
                <a href="../scheduler-pkg.html">
            
                    
                    react-scheduler
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="../perform-work.html">
            
                <a href="../perform-work.html">
            
                    
                    performWork
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="../perform-unit-of-work.html">
            
                <a href="../perform-unit-of-work.html">
            
                    
                    performUnitOfWork
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6" data-path="../render-root.html">
            
                <a href="../render-root.html">
            
                    
                    renderRoot
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="1.4.6.1" data-path="throw-exception.html">
            
                <a href="throw-exception.html">
            
                    
                    throwException
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.7" data-path="../begin-work.html">
            
                <a href="../begin-work.html">
            
                    
                    beginWork
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.7.1" data-path="../begin-work/mount-indeterminate-component.html">
            
                <a href="../begin-work/mount-indeterminate-component.html">
            
                    
                    mountIndeterminateComponent
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7.2" data-path="../begin-work/mount-lazy-component.html">
            
                <a href="../begin-work/mount-lazy-component.html">
            
                    
                    mountLazyComponent
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7.3" data-path="../begin-work/update-functional-component.html">
            
                <a href="../begin-work/update-functional-component.html">
            
                    
                    updateFunctionalComponent
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7.4" data-path="../begin-work/update-class-component.html">
            
                <a href="../begin-work/update-class-component.html">
            
                    
                    updateClassComponent
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7.5" data-path="../begin-work/update-host-root.html">
            
                <a href="../begin-work/update-host-root.html">
            
                    
                    updateHostRoot
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7.6" data-path="../begin-work/update-host-component.html">
            
                <a href="../begin-work/update-host-component.html">
            
                    
                    updateHostComponent
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7.7" data-path="../begin-work/update-host-text.html">
            
                <a href="../begin-work/update-host-text.html">
            
                    
                    updateHostText
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7.8" data-path="../../feature/Suspense-component.md">
            
                <span>
            
                    
                    updateSuspenseComponent
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7.9" data-path="../begin-work/update-portal-component.html">
            
                <a href="../begin-work/update-portal-component.html">
            
                    
                    updatePortalComponent
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7.10" data-path="../begin-work/update-forward-ref.html">
            
                <a href="../begin-work/update-forward-ref.html">
            
                    
                    updateForwardRef
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7.11" data-path="../begin-work/update-fragment.html">
            
                <a href="../begin-work/update-fragment.html">
            
                    
                    updateFragment
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7.12" data-path="../begin-work/update-mode.html">
            
                <a href="../begin-work/update-mode.html">
            
                    
                    updateMode
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7.13" data-path="../begin-work/update-profiler.html">
            
                <a href="../begin-work/update-profiler.html">
            
                    
                    updateProfiler
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7.14" data-path="../begin-work/update-context-provider.html">
            
                <a href="../begin-work/update-context-provider.html">
            
                    
                    updateContextProvider
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7.15" data-path="../begin-work/update-context-consumer.html">
            
                <a href="../begin-work/update-context-consumer.html">
            
                    
                    updateContextConsumer
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.8" data-path="../reconcile-children.html">
            
                <a href="../reconcile-children.html">
            
                    
                    reconcileChildren
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.8.1" data-path="../reconcile-children/single.html">
            
                <a href="../reconcile-children/single.html">
            
                    
                    调和单个节点
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.8.2" data-path="../reconcile-children/array.html">
            
                <a href="../reconcile-children/array.html">
            
                    
                    调和列表
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" >
            
                <span>
            
                    
                    commit 阶段
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../../commit-phase/commit-root.html">
            
                <a href="../../commit-phase/commit-root.html">
            
                    
                    commitRoot
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../../commit-phase/invokeGuardedCallback.html">
            
                <a href="../../commit-phase/invokeGuardedCallback.html">
            
                    
                    invokeGuardedCallback
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="../../commit-phase/commitBeforeMutationLifecycles.html">
            
                <a href="../../commit-phase/commitBeforeMutationLifecycles.html">
            
                    
                    commitBeforeMutationLifecycles
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="../../commit-phase/commit-all-host-effects.html">
            
                <a href="../../commit-phase/commit-all-host-effects.html">
            
                    
                    commitAllHostEffects
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.4.1" data-path="../../commit-phase/host-effects/CommitPlacement.html">
            
                <a href="../../commit-phase/host-effects/CommitPlacement.html">
            
                    
                    commitPlacement
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4.2" data-path="../../commit-phase/host-effects/CommitWork.html">
            
                <a href="../../commit-phase/host-effects/CommitWork.html">
            
                    
                    commitWork
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4.3" data-path="../../commit-phase/host-effects/CommitDeletion.html">
            
                <a href="../../commit-phase/host-effects/CommitDeletion.html">
            
                    
                    commitDeletion
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.5" data-path="../../commit-phase/commit-all-lifecycles.html">
            
                <a href="../../commit-phase/commit-all-lifecycles.html">
            
                    
                    commitAllLifecycle
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" >
            
                <span>
            
                    
                    功能
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../../features/context.html">
            
                <a href="../../features/context.html">
            
                    
                    context
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../../features/hydrate.html">
            
                <a href="../../features/hydrate.html">
            
                    
                    hydrate
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="../../features/ref.html">
            
                <a href="../../features/ref.html">
            
                    
                    ref
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="../../features/event-injection.html">
            
                <a href="../../features/event-injection.html">
            
                    
                    事件系统初始化
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.5" data-path="../../features/event-bind.html">
            
                <a href="../../features/event-bind.html">
            
                    
                    事件绑定
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6" data-path="../../features/event-dispatch.html">
            
                <a href="../../features/event-dispatch.html">
            
                    
                    事件触发
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7" data-path="../../features/event-create-event-object.html">
            
                <a href="../../features/event-create-event-object.html">
            
                    
                    事件对象生成
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.8" data-path="../../features/Suspense-component.html">
            
                <a href="../../features/Suspense-component.html">
            
                    
                    Suspense
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.9" data-path="../../features/suspense.html">
            
                <a href="../../features/suspense.html">
            
                    
                    挂起任务的含义
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.10" data-path="../../features/suspense-lazy.html">
            
                <a href="../../features/suspense-lazy.html">
            
                    
                    lazy 组件
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" >
            
                <span>
            
                    
                    Hooks
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../../hooks/hooks-start.html">
            
                <a href="../../hooks/hooks-start.html">
            
                    
                    开始
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="../../hooks/hooks-use-state.html">
            
                <a href="../../hooks/hooks-use-state.html">
            
                    
                    useState
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="../../hooks/hooks-use-effect.html">
            
                <a href="../../hooks/hooks-use-effect.html">
            
                    
                    useEffect
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.4" data-path="../../hooks/hooks-others.html">
            
                <a href="../../hooks/hooks-others.html">
            
                    
                    其他API
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.5" data-path="../../hooks/hooks-common.html">
            
                <a href="../../hooks/hooks-common.html">
            
                    
                    通用API
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <form
            action="https://buttondown.email/api/emails/embed-subscribe/Jokcy"
            method="post"
            target="popupwindow"
            onsubmit="window.open('https://buttondown.email/Jokcy', 'popupwindow')"
            class="buttondown-form"
            >
            <input type="email" name="email" id="bd-email" placeholder="(your@email.com)">
            <input type="hidden" value="1" name="embed"/>
            <button type="submit">订阅我</button>
        </form>
    </li>
</ul>

                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                 
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../.." >throwException</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="throwexception">throwException</h1><div class="api-method"><div class="api-method-definition"><p>&#x9996;&#x5148;&#x7ED9;&#x8FD9;&#x4E2A;<code>Fiber</code>&#x52A0;&#x4E0A;<code>Incomplete</code>&#x7684;<code>side effect</code>&#xFF0C;&#x5E76;&#x4E14;&#x6674;&#x7A7A;<code>effect</code>&#x94FE;</p><p>&#x4E3B;&#x8981;&#x5206;&#x4E3A;<code>suspend</code>&#x548C;<code>did error</code>&#x4E24;&#x79CD;&#x60C5;&#x51B5;</p><h2 id="suspend">suspend</h2><p>&#x9700;&#x8981;&#x7B26;&#x5408;&#x6761;&#x4EF6;&#xFF1A;<code>throw value</code>&#x662F;&#x4E00;&#x4E2A;<code>promise</code></p><pre><code class="lang-js"><span class="hljs-keyword">if</span> (
  value !== <span class="hljs-literal">null</span> &amp;&amp;
  <span class="hljs-keyword">typeof</span> value === <span class="hljs-string">&apos;object&apos;</span> &amp;&amp;
  <span class="hljs-keyword">typeof</span> value.then === <span class="hljs-string">&apos;function&apos;</span>
)</code></pre>
<p>&#x5904;&#x7406;&#x8FD9;&#x79CD;&#x60C5;&#x51B5;&#x4F1A;&#x6709;&#x4E24;&#x4E2A;&#x5FAA;&#x73AF;&#xFF0C;&#x5728;&#x8FD9;&#x4E4B;&#x524D;&#x521D;&#x59CB;&#x5316;&#x4E86;&#x4E24;&#x4E2A;&#x53D8;&#x91CF;<code>earliestTimeoutMs</code>&#x548C;<code>startTimeMs</code>&#xFF0C;&#x90FD;&#x662F;<code>-1</code></p><h4 id="&#x7B2C;&#x4E00;&#x4E2A;&#x5FAA;&#x73AF;">&#x7B2C;&#x4E00;&#x4E2A;&#x5FAA;&#x73AF;</h4><p>&#x8FD9;&#x4E2A;&#x5FAA;&#x73AF;&#x4E3B;&#x8981;&#x662F;&#x8BA1;&#x7B97;&#x521D;&#x59CB;&#x5316;&#x7684;&#x4E24;&#x4E2A;&#x503C;&#x3002;&#x4ED6;&#x4EEC;&#x53EA;&#x8DDF;<code>Suspense</code>&#x6709;&#x5173;&#x7CFB;&#xFF0C;<code>timeOutAt</code>&#x662F;&#x5728;<code>commitWork</code>&#x7684;&#x65F6;&#x5019;&#x8BBE;&#x7F6E;&#x7684;&#xFF0C;&#x6240;&#x4EE5;&#x7B2C;&#x4E00;&#x6B21;&#x6CA1;&#x6709;&#xFF0C;&#x800C;&#x8BBE;&#x7F6E;&#x7684;&#x503C;&#x5C31;&#x662F;&#x5F53;&#x65F6;&#x7684;<code>currentTime</code></p><pre><code class="lang-js"><span class="hljs-keyword">const</span> currentTime = requestCurrentTime()
finishedWork.stateNode = { timedOutAt: currentTime }</code></pre>
<p><code>earliestTimeoutMs</code>&#x8DDF;<code>maxDuration</code>&#x6709;&#x5173;&#xFF0C;&#x4ED6;&#x4F1A;&#x5411;&#x4E0A;&#x627E;&#x5230;<code>maxDuration</code>&#x6700;&#x5C0F;&#x7684;&#x975E;&#x8D1F;&#x6570;</p><p>&#x6240;&#x4EE5;&#x7B2C;&#x4E00;&#x6B21;&#x6E32;&#x67D3;&#x7684;&#x65F6;&#x5019;&#xFF0C;<code>startTimeMs</code>&#x662F;<code>-1</code>&#xFF0C;&#x7B2C;&#x4E8C;&#x6B21;&#x6E32;&#x67D3;<code>earliestTimeoutMs</code>&#x662F;<code>-1</code></p><h4 id="&#x7B2C;&#x4E8C;&#x4E2A;&#x5FAA;&#x73AF;">&#x7B2C;&#x4E8C;&#x4E2A;&#x5FAA;&#x73AF;</h4><p>&#x9996;&#x5148;<code>didTimeout = workInProgress.memoizedState</code>&#xFF0C;&#x90A3;&#x4E48;&#x8FD9;&#x4E2A;&#x4EC0;&#x4E48;&#x65F6;&#x5019;&#x4F1A;&#x53D8;&#x6210;<code>true</code>&#x5462;&#xFF1F;&#x662F;&#x5728;<code>updateSuspense</code>&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x5177;&#x4F53;&#x53EF;&#x4EE5;&#x770B;<a href="../others/suspense.md"><code>Suspense</code></a></p><p>&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x5927;&#x81F4;&#x6A21;&#x62DF;&#x4E00;&#x4E0B;&#x6D41;&#x7A0B;&#x3002;</p><ul><li>&#x7ECF;&#x8FC7;<code>updateSuspense</code>&#xFF0C;<code>didTimeout</code>&#x4E3A;<code>false</code>
</li>
<li>&#x7ED1;&#x5B9A;<code>thenable.then</code>&#x5230;<code>retrySuspendedRoot</code>
</li>
<li>&#x5982;&#x679C;&#x4E0D;&#x662F;<code>StrictMode</code>&#x4F1A;&#x76F4;&#x63A5;&#x53BB;&#x6389;<code>Incomplete</code>&#x7684;<code>side effect</code>&#xFF0C;&#x4E0D;&#x8FC7;&#x76EE;&#x524D;&#x53EA;&#x8981;&#x662F;<code>AsyncMode</code>&#x7684;&#x90FD;&#x4F1A;&#x81EA;&#x52A8;&#x673A;&#x4E0A;<code>StrictMode</code>&#xFF0C;&#x7136;&#x540E;&#x76F4;&#x63A5;<code>return</code>&#x4E86;
</li>
<li>&#x7136;&#x540E;&#x8BA1;&#x7B97;<code>absoluteTimeoutMs</code>&#xFF0C;&#x7136;&#x540E;&#x52A0;&#x4E0A;<code>ShouldCapture</code>&#x7684;<code>side effect</code>
</li>
<li>&#x52A0;&#x4E0A;<code>ShouldCapture</code>&#x4F1A;&#x8BA9;<code>Suspense</code>&#x7EC4;&#x4EF6;&#x518D;&#x6B21;&#x8FDB;&#x5165;<code>beginWork</code>&#x9636;&#x6BB5;&#x91CD;&#x65B0;<code>update</code>&#xFF0C;&#x8FD9;&#x65F6;&#x5019;<code>didTimeout</code>&#x4F1A;&#x53D8;&#x4E3A;<code>true</code>&#xFF0C;&#x5E76;&#x4E14;&#x6E32;&#x67D3;<code>fallback</code>&#x7684;&#x5185;&#x5BB9;
</li>
<li>&#x6700;&#x540E;
</li></ul>
<p><img alt="placeholder.png" src="https://i.postimg.cc/rwJ99f3L/placeholder.png"></p><h6 id="&#x90A3;&#x4E48;&#x7B2C;&#x4E8C;&#x4E2A;&#x5FAA;&#x73AF;&#x518D;didtimeout&#x4E2D;&#x7684;&#x903B;&#x8F91;&#x5177;&#x4F53;&#x662F;&#x4EC0;&#x4E48;&#x5462;">&#x90A3;&#x4E48;&#x7B2C;&#x4E8C;&#x4E2A;&#x5FAA;&#x73AF;&#x518D;<code>!didTimeout</code>&#x4E2D;&#x7684;&#x903B;&#x8F91;&#x5177;&#x4F53;&#x662F;&#x4EC0;&#x4E48;&#x5462;</h6><p>&#x9996;&#x5148;&#x8981;&#x7ED1;&#x5B9A;<code>suquense</code>&#x7EC4;&#x4EF6;&#x7684;<code>resolve</code>&#x4E4B;&#x540E;&#x8981;&#x6267;&#x884C;<code>retrySuspendedRoot</code>&#xFF0C;&#x7136;&#x540E;&#x8BA1;&#x7B97;<code>absoluteTimeoutMs</code>&#xFF0C;&#x7136;&#x540E;&#x8C03;&#x7528;<code>renderDidSuspend</code>&#xFF0C;&#x8FD9;&#x5757;&#x6211;&#x4EEC;&#x653E;&#x5230;&#x4E0B;&#x9762;&#x518D;&#x8BB2;&#x3002;</p><h4 id="&#x6CE8;&#x610F;">&#x6CE8;&#x610F;</h4><p><strong>&#x5728;&#x5199;&#x8FD9;&#x7247;&#x6587;&#x7AE0;&#x7684;&#x65F6;&#x5019;<code>susquense</code>&#x529F;&#x80FD;&#x5E76;&#x6CA1;&#x6709;&#x6B63;&#x5F0F;&#x53D1;&#x5E03;&#xFF0C;&#x6240;&#x4EE5;&#x53EF;&#x80FD;&#x4F1A;&#x6709;&#x633A;&#x591A;&#x6539;&#x52A8;&#xFF0C;&#x5E76;&#x4E14;&#x4E5F;&#x5B58;&#x5728;&#x4E00;&#x4E9B; bug&#xFF0C;&#x6BD4;&#x5982;<code>maxDuration</code>&#x8C8C;&#x4F3C;&#x6CA1;&#x7528;&#xFF0C;&#x518D;&#x6BD4;&#x5982;&#x591A;&#x6B21;<code>throwException</code>&#x4E2D;&#x4F1A;&#x7ED9;&#x540C;&#x4E00;&#x4E2A;<code>promise</code>&#x7ED1;&#x5B9A;&#x591A;&#x6B21;<code>retry</code>&#xFF0C;&#x5BFC;&#x81F4;&#x540E;&#x6765;<code>retry</code>&#x591A;&#x6B21;&#x6E32;&#x67D3;&#xFF0C;&#x76F8;&#x4FE1;&#x5728; 17 &#x7248;&#x672C;&#x53D1;&#x5E03;&#x7684;&#x65F6;&#x5019;&#x5E94;&#x8BE5;&#x6709;&#x6240;&#x6539;&#x5584;&#x3002;</strong></p><p>TODO: 17 &#x7248;&#x672C;&#x53D1;&#x5E03;&#x4E4B;&#x540E;&#x518D;&#x6B21;&#x786E;&#x8BA4;&#x8FD9;&#x90E8;&#x5206;&#x4EE3;&#x7801;</p><h2 id="&#x975E;suspense&#x7684;&#x60C5;&#x51B5;">&#x975E;<code>Suspense</code>&#x7684;&#x60C5;&#x51B5;</h2><p>&#x8FD9;&#x79CD;&#x60C5;&#x51B5;&#x76F8;&#x5F53;&#x4E8E;&#x6355;&#x6349;&#x5230;&#x4E86;&#x4E00;&#x4E2A;&#x9519;&#x8BEF;&#xFF0C;&#x8FD9;&#x8FB9;&#x7684;&#x64CD;&#x4F5C;&#x662F;&#x5411;&#x4E0A;&#x904D;&#x5386;&#x8282;&#x70B9;&#xFF0C;&#x5BF9;<code>HostRoot</code>&#x3001;<code>ClassComponent</code>&#x548C;<code>ClassComponentLazy</code>&#x505A;&#x4E00;&#x4E9B;&#x64CD;&#x4F5C;&#xFF1A;</p><ol><li>&#x52A0;&#x4E0A;<code>shouldCapture</code>&#x7684;<code>side effect</code>
</li>
<li>&#x521B;&#x5EFA;<code>error update</code>
</li></ol>
<p>&#x6CE8;&#x610F;&#xFF0C;&#x5BF9;&#x4E8E;<code>ClassComponent</code>&#x53EA;&#x6709;&#x5F53;&#x7EC4;&#x4EF6;&#x58F0;&#x660E;<code>getDerivedStateFromCatch</code>&#x6216;&#x8005;<code>componentDidCatch</code>&#x7684;&#x7EC4;&#x4EF6;&#x4F1A;&#x505A;&#x8FD9;&#x4E9B;&#x64CD;&#x4F5C;</p></div><div class="api-method-code"><div class="api-method-sample" data-lang="js" data-name="JavaScript"><pre><code class="lang-js"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">throwException</span>(<span class="hljs-params">
  root: FiberRoot,
  returnFiber: Fiber,
  sourceFiber: Fiber,
  value: mixed,
  renderExpirationTime: ExpirationTime,
</span>) </span>{
  <span class="hljs-comment">// The source fiber did not complete.</span>
  sourceFiber.effectTag |= Incomplete
  <span class="hljs-comment">// Its effect list is no longer valid.</span>
  sourceFiber.firstEffect = sourceFiber.lastEffect = <span class="hljs-literal">null</span>

  <span class="hljs-keyword">if</span> (
    value !== <span class="hljs-literal">null</span> &amp;&amp;
    <span class="hljs-keyword">typeof</span> value === <span class="hljs-string">&apos;object&apos;</span> &amp;&amp;
    <span class="hljs-keyword">typeof</span> value.then === <span class="hljs-string">&apos;function&apos;</span>
  ) {
    <span class="hljs-comment">// This is a thenable.</span>
    <span class="hljs-keyword">const</span> thenable: Thenable = (value: any)

    <span class="hljs-keyword">let</span> workInProgress = returnFiber
    <span class="hljs-keyword">let</span> earliestTimeoutMs = <span class="hljs-number">-1</span>
    <span class="hljs-keyword">let</span> startTimeMs = <span class="hljs-number">-1</span>
    <span class="hljs-keyword">do</span> {
      <span class="hljs-keyword">if</span> (workInProgress.tag === SuspenseComponent) {
        <span class="hljs-keyword">const</span> current = workInProgress.alternate
        <span class="hljs-keyword">if</span> (current !== <span class="hljs-literal">null</span>) {
          <span class="hljs-keyword">const</span> currentState: SuspenseState | <span class="hljs-literal">null</span> = current.memoizedState
          <span class="hljs-keyword">if</span> (currentState !== <span class="hljs-literal">null</span> &amp;&amp; currentState.didTimeout) {
            <span class="hljs-comment">// Reached a boundary that already timed out. Do not search</span>
            <span class="hljs-comment">// any further.</span>
            <span class="hljs-keyword">const</span> timedOutAt = currentState.timedOutAt
            startTimeMs = expirationTimeToMs(timedOutAt)
            <span class="hljs-comment">// Do not search any further.</span>
            <span class="hljs-keyword">break</span>
          }
        }
        <span class="hljs-keyword">let</span> timeoutPropMs = workInProgress.pendingProps.maxDuration
        <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> timeoutPropMs === <span class="hljs-string">&apos;number&apos;</span>) {
          <span class="hljs-keyword">if</span> (timeoutPropMs &lt;= <span class="hljs-number">0</span>) {
            earliestTimeoutMs = <span class="hljs-number">0</span>
          } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (
            earliestTimeoutMs === <span class="hljs-number">-1</span> ||
            timeoutPropMs &lt; earliestTimeoutMs
          ) {
            earliestTimeoutMs = timeoutPropMs
          }
        }
      }
      workInProgress = workInProgress.return
    } <span class="hljs-keyword">while</span> (workInProgress !== <span class="hljs-literal">null</span>)

    <span class="hljs-comment">// Schedule the nearest Suspense to re-render the timed out view.</span>
    workInProgress = returnFiber
    <span class="hljs-keyword">do</span> {
      <span class="hljs-keyword">if</span> (
        workInProgress.tag === SuspenseComponent &amp;&amp;
        shouldCaptureSuspense(workInProgress.alternate, workInProgress)
      ) {
        <span class="hljs-keyword">const</span> pingTime =
          (workInProgress.mode &amp; ConcurrentMode) === NoEffect
            ? Sync
            : renderExpirationTime

        <span class="hljs-comment">// Attach a listener to the promise to &quot;ping&quot; the root and retry.</span>
        <span class="hljs-keyword">let</span> onResolveOrReject = retrySuspendedRoot.bind(
          <span class="hljs-literal">null</span>,
          root,
          workInProgress,
          sourceFiber,
          pingTime,
        )
        <span class="hljs-keyword">if</span> (enableSchedulerTracing) {
          onResolveOrReject = Schedule_tracing_wrap(onResolveOrReject)
        }
        thenable.then(onResolveOrReject, onResolveOrReject)
        <span class="hljs-keyword">if</span> ((workInProgress.mode &amp; ConcurrentMode) === NoEffect) {
          workInProgress.effectTag |= CallbackEffect

          <span class="hljs-comment">// Unmount the source fiber&apos;s children</span>
          <span class="hljs-keyword">const</span> nextChildren = <span class="hljs-literal">null</span>
          reconcileChildren(
            sourceFiber.alternate,
            sourceFiber,
            nextChildren,
            renderExpirationTime,
          )
          sourceFiber.effectTag &amp;= ~Incomplete

          <span class="hljs-keyword">if</span> (sourceFiber.tag === ClassComponent) {
            sourceFiber.effectTag &amp;= ~LifecycleEffectMask
            <span class="hljs-keyword">const</span> current = sourceFiber.alternate
            <span class="hljs-keyword">if</span> (current === <span class="hljs-literal">null</span>) {
              sourceFiber.tag = IncompleteClassComponent
            }
          }

          <span class="hljs-comment">// Exit without suspending.</span>
          <span class="hljs-keyword">return</span>
        }

        <span class="hljs-keyword">let</span> absoluteTimeoutMs
        <span class="hljs-keyword">if</span> (earliestTimeoutMs === <span class="hljs-number">-1</span>) {
          absoluteTimeoutMs = maxSigned31BitInt
        } <span class="hljs-keyword">else</span> {
          <span class="hljs-keyword">if</span> (startTimeMs === <span class="hljs-number">-1</span>) {
            <span class="hljs-keyword">const</span> earliestExpirationTime = findEarliestOutstandingPriorityLevel(
              root,
              renderExpirationTime,
            )
            <span class="hljs-keyword">const</span> earliestExpirationTimeMs = expirationTimeToMs(
              earliestExpirationTime,
            )
            startTimeMs = earliestExpirationTimeMs - LOW_PRIORITY_EXPIRATION
          }
          absoluteTimeoutMs = startTimeMs + earliestTimeoutMs
        }
        renderDidSuspend(root, absoluteTimeoutMs, renderExpirationTime)

        workInProgress.effectTag |= ShouldCapture
        workInProgress.expirationTime = renderExpirationTime
        <span class="hljs-keyword">return</span>
      }
      workInProgress = workInProgress.return
    } <span class="hljs-keyword">while</span> (workInProgress !== <span class="hljs-literal">null</span>)
    <span class="hljs-comment">// No boundary was found. Fallthrough to error mode.</span>
    value = <span class="hljs-keyword">new</span> <span class="hljs-built_in">Error</span>(
      <span class="hljs-string">&apos;An update was suspended, but no placeholder UI was provided.&apos;</span>,
    )
  }

  renderDidError()
  value = createCapturedValue(value, sourceFiber)
  <span class="hljs-keyword">let</span> workInProgress = returnFiber
  <span class="hljs-keyword">do</span> {
    <span class="hljs-keyword">switch</span> (workInProgress.tag) {
      <span class="hljs-keyword">case</span> HostRoot: {
        <span class="hljs-keyword">const</span> errorInfo = value
        workInProgress.effectTag |= ShouldCapture
        workInProgress.expirationTime = renderExpirationTime
        <span class="hljs-keyword">const</span> update = createRootErrorUpdate(
          workInProgress,
          errorInfo,
          renderExpirationTime,
        )
        enqueueCapturedUpdate(workInProgress, update)
        <span class="hljs-keyword">return</span>
      }
      <span class="hljs-keyword">case</span> ClassComponent:
        <span class="hljs-comment">// Capture and retry</span>
        <span class="hljs-keyword">const</span> errorInfo = value
        <span class="hljs-keyword">const</span> ctor = workInProgress.type
        <span class="hljs-keyword">const</span> instance = workInProgress.stateNode
        <span class="hljs-keyword">if</span> (
          (workInProgress.effectTag &amp; DidCapture) === NoEffect &amp;&amp;
          (<span class="hljs-keyword">typeof</span> ctor.getDerivedStateFromError === <span class="hljs-string">&apos;function&apos;</span> ||
            (instance !== <span class="hljs-literal">null</span> &amp;&amp;
              <span class="hljs-keyword">typeof</span> instance.componentDidCatch === <span class="hljs-string">&apos;function&apos;</span> &amp;&amp;
              !isAlreadyFailedLegacyErrorBoundary(instance)))
        ) {
          workInProgress.effectTag |= ShouldCapture
          workInProgress.expirationTime = renderExpirationTime
          <span class="hljs-comment">// Schedule the error boundary to re-render using updated state</span>
          <span class="hljs-keyword">const</span> update = createClassErrorUpdate(
            workInProgress,
            errorInfo,
            renderExpirationTime,
          )
          enqueueCapturedUpdate(workInProgress, update)
          <span class="hljs-keyword">return</span>
        }
        <span class="hljs-keyword">break</span>
      <span class="hljs-keyword">default</span>:
        <span class="hljs-keyword">break</span>
    }
    workInProgress = workInProgress.return
  } <span class="hljs-keyword">while</span> (workInProgress !== <span class="hljs-literal">null</span>)
}</code></pre>
</div></div></div>



<div class="api-method"><div class="api-method-definition"><h1 id="absolutetimeoutms">absoluteTimeoutMs</h1><p>&#x6211;&#x4EEC;&#x4E0A;&#x9762;&#x63D0;&#x5230;&#x4E86;&#xFF1A;</p><ul><li><code>earliestTimeoutMs</code>&#x662F;&#x6700;&#x5C0F;&#x7684;<code>maxDuration</code>
</li>
<li><code>startTimeMs</code>&#x662F;&#x4E0A;&#x6B21;<code>commit</code>&#x8BBE;&#x7F6E;&#x7684;<code>timedOutAt</code>
</li></ul>
<p>&#x5982;&#x679C;&#x6CA1;&#x6709;&#x8BBE;&#x7F6E;<code>maxDuration</code>&#xFF0C;&#x90A3;&#x4E48;<code>absoluteTimeoutMs</code>&#x662F;<code>maxSigned31BitInt</code>&#x4E5F;&#x5C31;&#x662F;<code>1073741823</code>&#xFF0C;&#x57FA;&#x672C;&#x610F;&#x601D;&#x5C31;&#x662F;&#x6C38;&#x8FDC;&#x4E0D;&#x8FC7;&#x8D85;&#x65F6;</p><p>&#x5982;&#x679C;&#x6709;&#x8BBE;&#x7F6E;<code>maxDuration</code>&#xFF0C;&#x56E0;&#x4E3A;&#x7B2C;&#x4E00;&#x6B21;&#x6CA1;&#x6709;<code>startTimeMs</code>&#xFF0C;&#x6240;&#x4EE5;&#x8981;&#x8BA1;&#x7B97;&#x4E00;&#x4E2A;&#xFF0C;&#x4ECE;&#x5F53;&#x524D;<code>root</code>&#x7684;&#x6240;&#x6709;&#x8FC7;&#x671F;&#x65F6;&#x95F4;&#x4E2D;&#x627E;&#x4E00;&#x4E2A;&#x4F18;&#x5148;&#x7EA7;&#x6700;&#x9AD8;&#x7684;&#xFF0C;&#x7136;&#x540E;&#x51CF;&#x53BB;<code>LOW_PRIORITY_EXPIRATION</code>&#xFF0C;&#x8FD9;&#x90E8;&#x5206;&#x8BA1;&#x7B97;&#x4E0D;&#x5FC5;&#x8981;&#x592A;&#x5728;&#x610F;&#xFF0C;&#x6211;&#x4EEC;&#x4E3B;&#x8981;&#x770B;&#x4E00;&#x4E0B;&#x7B2C;&#x4E8C;&#x6B21;&#x8FDB;&#x6765;&#x7684;&#x65F6;&#x5019;</p><p>&#x5728;&#x6709;<code>earliestTimeoutMs</code>&#x548C;<code>startTimeMs</code>&#x7684;&#x60C5;&#x51B5;&#x4E0B;&#xFF0C;<code>absoluteTimeoutMs</code>&#x7B49;&#x4E8E;<code>startTimeMs + earliestTimeoutM</code>&#xFF0C;&#x7B80;&#x5355;&#x6765;&#x8BF4;&#x5C31;&#x662F;&#x5C11;&#x4E86;&#x7B2C;&#x4E00;&#x6B21;&#x6E32;&#x67D3;&#x5230;&#x8FD9;&#x6B21;&#x6709;&#x66F4;&#x65B0;&#x8FDB;&#x6765;&#x4E2D;&#x95F4;&#x7684;&#x7A7A;&#x767D;&#x65F6;&#x95F4;&#xFF0C;&#x4E5F;&#x7B26;&#x5408;<code>maxDuration</code>&#x9700;&#x8981;&#x7684;&#x542B;&#x4E49;&#x3002;</p><p><strong>&#x4F46;&#x662F;&#x6839;&#x636E;&#x4E4B;&#x524D;&#x8BF4;&#x7684;&#x903B;&#x8F91;&#xFF0C;&#x5728;&#x6709;<code>startTimeMs</code>&#x7684;&#x60C5;&#x51B5;&#x4E0B;&#x6839;&#x672C;&#x4E0D;&#x4F1A;&#x6267;&#x884C;<code>earliestTimeoutMs</code>&#x7684;&#x903B;&#x8F91;&#xFF0C;&#x6240;&#x4EE5;&#x8FD9;&#x4E2A;&#x903B;&#x8F91;&#x662F;&#x5426;&#x6709;&#x95EE;&#x9898;&#xFF1F;&#x5B9E;&#x9645;&#x6211;&#x5199;&#x4E86;&#x4E2A;&#x5C0F;&#x4F8B;&#x5B50;&#x770B;&#x4E86;&#x4E00;&#x4E0B;&#x7ED3;&#x679C;&#x4E5F;&#x662F;&#x548C;&#x6211;&#x7684;&#x9884;&#x671F;&#x4E00;&#x6837;</strong></p><p>TODO: 17 &#x7248;&#x672C;&#x6765;&#x9A8C;&#x8BC1;&#x8FD9;&#x4E2A;&#x903B;&#x8F91;&#x662F;&#x5426;&#x6709;&#x95EE;&#x9898;</p><p><a href="../render-root.html">&#x56DE;&#x5230;<code>renderRoot</code></a></p></div><div class="api-method-code"><div class="api-method-sample" data-lang="js" data-name="JavaScript"><pre><code class="lang-js"><span class="hljs-comment">// throwException</span>
<span class="hljs-keyword">let</span> absoluteTimeoutMs
<span class="hljs-keyword">if</span> (earliestTimeoutMs === <span class="hljs-number">-1</span>) {
  absoluteTimeoutMs = maxSigned31BitInt
} <span class="hljs-keyword">else</span> {
  <span class="hljs-keyword">if</span> (startTimeMs === <span class="hljs-number">-1</span>) {
    <span class="hljs-keyword">const</span> earliestExpirationTime = findEarliestOutstandingPriorityLevel(
      root,
      renderExpirationTime,
    )
    <span class="hljs-keyword">const</span> earliestExpirationTimeMs = expirationTimeToMs(earliestExpirationTime)
    startTimeMs = earliestExpirationTimeMs - LOW_PRIORITY_EXPIRATION
  }
  absoluteTimeoutMs = startTimeMs + earliestTimeoutMs
}

renderDidSuspend(root, absoluteTimeoutMs, renderExpirationTime)

<span class="hljs-comment">// renderDidSuspend</span>
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">renderDidSuspend</span>(<span class="hljs-params">
  root: FiberRoot,
  absoluteTimeoutMs: number,
  suspendedTime: ExpirationTime,
</span>) </span>{
  <span class="hljs-comment">// Schedule the timeout.</span>
  <span class="hljs-keyword">if</span> (
    absoluteTimeoutMs &gt;= <span class="hljs-number">0</span> &amp;&amp;
    nextLatestAbsoluteTimeoutMs &lt; absoluteTimeoutMs
  ) {
    nextLatestAbsoluteTimeoutMs = absoluteTimeoutMs
  }
}</code></pre>
</div></div></div>




                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
<div id="disqus_thread"></div>
<script>
  /**
   *  RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
   *  LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables*/
  /*
var disqus_config = function () {
this.page.url = PAGE_URL;  // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};
*/
  ;(function() {
    // DON'T EDIT BELOW THIS LINE
    var d = document,
      s = d.createElement('script')
    s.src = 'https://react-source-code.disqus.com/embed.js'
    s.setAttribute('data-timestamp', +new Date())
    ;(d.head || d.body).appendChild(s)
  })()
</script>
<noscript
  >Please enable JavaScript to view the
  <a href="https://disqus.com/?ref_noscript"
    >comments powered by Disqus.</a
  ></noscript
>

            </div>

            

        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"throwException","level":"1.4.6.1","depth":3,"next":{"title":"beginWork","level":"1.4.7","depth":2,"path":"book/flow/begin-work.md","ref":"book/flow/begin-work.md","articles":[{"title":"mountIndeterminateComponent","level":"1.4.7.1","depth":3,"path":"book/flow/begin-work/mount-indeterminate-component.md","ref":"book/flow/begin-work/mount-indeterminate-component.md","articles":[]},{"title":"mountLazyComponent","level":"1.4.7.2","depth":3,"path":"book/flow/begin-work/mount-lazy-component.md","ref":"book/flow/begin-work/mount-lazy-component.md","articles":[]},{"title":"updateFunctionalComponent","level":"1.4.7.3","depth":3,"path":"book/flow/begin-work/update-functional-component.md","ref":"book/flow/begin-work/update-functional-component.md","articles":[]},{"title":"updateClassComponent","level":"1.4.7.4","depth":3,"path":"book/flow/begin-work/update-class-component.md","ref":"book/flow/begin-work/update-class-component.md","articles":[]},{"title":"updateHostRoot","level":"1.4.7.5","depth":3,"path":"book/flow/begin-work/update-host-root.md","ref":"book/flow/begin-work/update-host-root.md","articles":[]},{"title":"updateHostComponent","level":"1.4.7.6","depth":3,"path":"book/flow/begin-work/update-host-component.md","ref":"book/flow/begin-work/update-host-component.md","articles":[]},{"title":"updateHostText","level":"1.4.7.7","depth":3,"path":"book/flow/begin-work/update-host-text.md","ref":"book/flow/begin-work/update-host-text.md","articles":[]},{"title":"updateSuspenseComponent","level":"1.4.7.8","depth":3,"path":"book/feature/Suspense-component.md","ref":"book/feature/Suspense-component.md","articles":[]},{"title":"updatePortalComponent","level":"1.4.7.9","depth":3,"path":"book/flow/begin-work/update-portal-component.md","ref":"book/flow/begin-work/update-portal-component.md","articles":[]},{"title":"updateForwardRef","level":"1.4.7.10","depth":3,"path":"book/flow/begin-work/update-forward-ref.md","ref":"book/flow/begin-work/update-forward-ref.md","articles":[]},{"title":"updateFragment","level":"1.4.7.11","depth":3,"path":"book/flow/begin-work/update-fragment.md","ref":"book/flow/begin-work/update-fragment.md","articles":[]},{"title":"updateMode","level":"1.4.7.12","depth":3,"path":"book/flow/begin-work/update-mode.md","ref":"book/flow/begin-work/update-mode.md","articles":[]},{"title":"updateProfiler","level":"1.4.7.13","depth":3,"path":"book/flow/begin-work/update-profiler.md","ref":"book/flow/begin-work/update-profiler.md","articles":[]},{"title":"updateContextProvider","level":"1.4.7.14","depth":3,"path":"book/flow/begin-work/update-context-provider.md","ref":"book/flow/begin-work/update-context-provider.md","articles":[]},{"title":"updateContextConsumer","level":"1.4.7.15","depth":3,"path":"book/flow/begin-work/update-context-consumer.md","ref":"book/flow/begin-work/update-context-consumer.md","articles":[]}]},"previous":{"title":"renderRoot","level":"1.4.6","depth":2,"path":"book/flow/render-root.md","ref":"book/flow/render-root.md","articles":[{"title":"throwException","level":"1.4.6.1","depth":3,"path":"book/flow/render-root/throw-exception.md","ref":"book/flow/render-root/throw-exception.md","articles":[]}]},"dir":"ltr"},"config":{"plugins":["theme-api"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"sharing":{"facebook":false,"twitter":false,"google":false,"weibo":true,"instapaper":false,"vk":false,"all":["weibo","google","twitter","weibo","instapaper"]},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-api":{"languages":[],"split":true,"theme":"light"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"React源码解析","language":"zh-hans","gitbook":"*"},"file":{"path":"book/flow/render-root/throw-exception.md","mtime":"2018-11-16T11:50:37.193Z","type":"markdown"},"gitbook":{"version":"3.2.0","time":"2019-07-08T12:28:32.264Z"},"basePath":"../../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../../gitbook/gitbook.js"></script>
    <script src="../../../gitbook/theme.js"></script>
    
        
        <script src="../../../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-theme-api/theme-api.js"></script>
        
    

    </body>
</html>

